import { http } from "@/utils/http";

type ResultTable = {
  total?: number;
  data?: Array<any>;
};

//水质检测-废水 查询列表
export const wasteWaterqueryListPage = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/wasteWater/queryListPage`, {
    data
  });
};

//水质检测-废水 获取检测项目
export const wasteWatergetTestItem = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/wasteWater/getTestItem`, {
    data
  });
};

//水质检测-废水 新增
export const wasteWateradd = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/wasteWater/add`, {
    data
  });
};

//水质检测-废水 更新
export const wasteWaterupdate = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/wasteWater/update`, {
    data
  });
};

//水质检测-废水 详情
export const wasteWaterqueryDetail = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/wasteWater/queryDetail`, {
    data
  });
};

//水质检测-废水 删除
export const wasteWaterdelete = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/wasteWater/delete`, {
    data
  });
};

//水质检测-纯水金属阴阳离子 查询列表
export const pwMetalImpurityqueryListPage = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwMetalImpurity/queryListPage`, {
    data
  });
};

//水质检测-纯水金属阴阳离子 新增
export const pwMetalImpurityadd = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwMetalImpurity/add`, {
    data
  });
};

//水质检测-纯水金属阴阳离子 详情
export const pwMetalImpurityqueryDetail = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwMetalImpurity/queryDetail`, {
    data
  });
};

//水质检测-纯水金属阴阳离子 更新
export const pwMetalImpurityupdate = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwMetalImpurity/update`, {
    data
  });
};

//水质检测-纯水金属阴阳离子 删除
export const pwMetalImpuritydelete = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwMetalImpurity/delete`, {
    data
  });
};

//水质检测-纯水金属阴阳离子 获取检测项目
export const pwMetalImpuritygetTestItem = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwMetalImpurity/getTestItem`, {
    data
  });
};

/////////////////////////////////////////
//水质检测-纯水细菌 批量导入
export const pwBacteriaimportData = (data?: object) => {
  return http.request<ResultTable>(
    "post",
    `/operation/api/v1/water/testQuality/pwBacteria/importData`,
    {
      data
    },
    {
      headers: {
        "Content-type": "multipart/form-data"
      }
    }
  );
};

//水质检测-纯水细菌 查询列表
export const pwBacteriaqueryListPage = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwBacteria/queryListPage`, {
    data
  });
};

//水质检测-纯水细菌 新增
export const pwBacteriaadd = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwBacteria/add`, {
    data
  });
};

//水质检测-纯水细菌 详情
export const pwBacteriaqueryDetail = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwBacteria/queryDetail`, {
    data
  });
};

//水质检测-纯水细菌 更新
export const pwBacteriaupdate = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwBacteria/update`, {
    data
  });
};

//水质检测-纯水金属阴阳离子 删除
export const pwBacteriadelete = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwBacteria/delete`, {
    data
  });
};

//水质检测-纯水金属阴阳离子 获取检测项目
export const pwBacteriagetTestItem = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwBacteria/getTestItem`, {
    data
  });
};

//获取排水量
export const testQualityqueryScadaDiff = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/queryDischargeRate`, {
    data
  });
};

// 交接人
export const userlistPage = (data?: object) => {
  return http.request<ResultTable>("post", `/account/api/v1/user/listPage`, {
    data
  });
};

// 报表查询
export const testQualityqueryReport = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/queryReport`, {
    data
  });
};

//水质检测-废水 导入
export const wasteWaterimportData = (data?: object) => {
  return http.request<ResultTable>(
    "post",
    `/operation/api/v1/water/testQuality/wasteWater/importTestItemData`,
    {
      data
    },
    { headers: { noLoading: true, "Content-Type": "multipart/form-data" } }
  );
};

//水质检测-纯水金属阴阳离子 批量导入
export const pwMetalImpurityimportData = (data?: object) => {
  return http.request<ResultTable>(
    "post",
    `/operation/api/v1/water/testQuality/pwMetalImpurity/importTestItemData`,
    {
      data
    },
    {
      headers: {
        "Content-type": "multipart/form-data"
      }
    }
  );
};

// 水质检测-新增-修改-检测机构
export const postTestManufacturerList = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/testManufacturer/selectList`, { data });
};

// 水质检测-纯水-查询复检记录
export const queryRecheckList = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwMetalImpurity/queryRecheckList`, {
    data
  });
};

// 水质检测-纯水-关联复查
export const updateRecheckNumber = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwMetalImpurity/updateRecheckNumber`, {
    data
  });
};

// 水质检测-废水-查询复检记录
export const queryWasteWaterRecheckList = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/wasteWater/queryRecheckList`, {
    data
  });
};

// 水质检测-废水-关联复查
export const updateWasteWaterRecheckNumber = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/wasteWater/updateRecheckNumber`, {
    data
  });
};

// 纯水-取样点下拉列表
export const getSelectSimplingLocationList = (data: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/pwMetalImpurity/selectSimplingLocationList`, {
    data
  });
};

// 废水-取样点下拉列表
export const getWasteWaterSimplingLocationList = (data: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/testQuality/wasteWater/selectSimplingLocationList`, {
    data
  });
};
